package com.shketai.service;

import java.util.List;

import com.shketai.dao.LogDao;
import com.shketai.entity.DBLogger;
import com.shketai.entity.PageBean;

public class LogService {
	
	private LogDao logDao;
	
	

	public void setLogDao(LogDao logDao) {
		this.logDao = logDao;
	}



	public void writeLog(DBLogger dbLogger) {
		logDao.log(dbLogger);
	}	

	
	public PageBean<DBLogger> findAll(int page){
		PageBean<DBLogger> pb = new PageBean<DBLogger>();
		List<DBLogger> list = logDao.findAll(page);
		 pb.setDatas(list);
		 int total =logDao.findCount();
			pb.setTotal(total);
			return pb;
	}
}
